<?php

// SUBMIT RULES BY LiveValidationPHP
$formRules =array();

$formRules['makedownloadform']=array
(
	// TITLE CHEDCK
	'title' => array
	(
		'args'=>array('validMessage' => _MD_D3DOWNLOADS_TITLE_OK ),
		'display'=>'',
		'rules'=>array
		(
			array
			(
				'method'=>'Validate.Presence',
				'args'=>array('failureMessage' => _MD_D3DOWNLOADS_TITLE_NONE )
			),
		)	
	),

	// URL CHEDCK
	'url' => array
	(
		'args'=>array('validMessage' => _MD_D3DOWNLOADS_URL_OK ),
		'display'=>'',
		'rules'=>array
		(
			array
			(
				'method'=>'Validate.Presence',
				'args'=>array('failureMessage' => _MD_D3DOWNLOADS_URL_NONE )
			),
			array
			(
				'method'=>'Validate.Format',
				'args'=>array('pattern' => '/^https?:\/\/.+\..+/', 'failureMessage' => _MD_D3DOWNLOADS_URL_CHECK )
			),
		)	
	),
/*
	// HOMEPAGE CHEDCK
	'homepage' => array
	(
		'args'=>array('validMessage' => _MD_D3DOWNLOADS_HOMEPAGE_OK ),
		'display'=>'',
		'rules'=>array
		(
			array
			(
				'method'=>'Validate.Format',
				'args'=>array('pattern' => '/^https?:\/\/.+\..+|^https?/', 'failureMessage' => _MD_D3DOWNLOADS_HOMEPAGE_CHECK )
			),
		)	
	),
*/

	// SIZE CHEDCK
	'size' => array
	(
		'args'=>array('validMessage' => _MD_D3DOWNLOADS_SIZE_OK ),
		'display'=>'',
		'rules'=>array
		(
			array
			(
				'method'=>'Validate.Format',
				'args'=>array('pattern' => '/^[0-9]+$/', 'failureMessage' => _MD_D3DOWNLOADS_SIZE_CHECK )
			),
		)	
	),

	// DESCRIPTION CHEDCK
	'description' => array
	(
		'args'=>array('validMessage' => _MD_D3DOWNLOADS_DESCRIPTION_OK ),
		'display'=>'',
		'rules'=>array
		(
			array
			(
				'method'=>'Validate.Presence',
				'args'=>array('failureMessage' => _MD_D3DOWNLOADS_DESCRIPTION_NONE )
			),
		)	
	),
);
?>